import './App.css';
import { NavLink, Routes, Route, Navigate } from 'react-router-dom'
import Type from './views/Type';
import Home from './views/Home';
import Mine from './views/Mine';

import Ding from './views/Ding';
import Home1 from './views/Home1';
import Home2 from './views/Home2';
import Login from './views/Login';

function App() {

  return (
    <div className="App">
      <div className="top"></div>
      <div className="body">
        <Routes>
          <Route path='/' element={<Navigate to='/home'></Navigate>}></Route>
          <Route path='/home' element={<Home></Home>}>
            <Route path='/home/' element={<Navigate to='/home/home1'></Navigate>}></Route>
            <Route path='/home/home1' element={<Home1></Home1>}></Route>
            <Route path='/home/home2' element={<Home2></Home2>}></Route>
          </Route>
          <Route path='/dian' element={<Ding></Ding>}></Route>
          <Route path='/ding' element={<Type></Type>}></Route>
          <Route path='/mine' element={<Mine></Mine>}></Route>
          <Route path='/login' element={<Login></Login>}></Route>
        </Routes>
      </div>
      <div className="bottom">
        <NavLink to='/home'>首页</NavLink>
        <NavLink to='/dian'>点餐</NavLink>
        <NavLink to='/ding'>订单</NavLink>
        <NavLink to='/mine'>我的</NavLink>
      </div>
    </div>
  );
}

export default App;
